Two-dimensional code, two-dimensional code output system, two-dimensional code output method, two-dimensional code reading system, and two-dimensional code reading method

ABSTRACT

A two-dimensional code includes: a first code symbol coding first information being valid information according to a first standard; a terminator pattern indicating an end of the valid information according to the first standard; and a second code symbol arranged after the terminator pattern in a region in which the valid information can be arranged according to the first standard and coding second information being valid information according to a second standard different from the first standard. The first information may be output data, and the second information may be non-output data.

TECHNICAL FIELD

The invention relates to a two-dimensional code representing information by code symbols, a two-dimensional code output system and a two-dimensional code output method for outputting the two-dimensional code, a two-dimensional code reading system and a two-dimensional code reading method for reading the two-dimensional code, and a non-transitory machine-readable storage medium containing program instructions for causing one computer or a plurality of computers in cooperation to execute the two-dimensional code output method or the two-dimensional code reading method.

BACKGROUND ART

A two-dimensional code as illustrated in FIG. 14 representing various kinds of information by code symbols is conventionally known. The two-dimensional code represents a binary bit string by an array of white modules and black modules different from each other in light reflectance, and the bit string represents information, for example, in a form illustrated in FIG. 15.

A bit string (encoded data) 500 illustrated in FIG. 15 contains output data 510, a terminator pattern 520, padding data 530, and error correcting data 540.

The output data 510 is valid information to be output as a reading result of the two-dimensional code and includes a plurality of segments. Each of the segments is defined in a standard for the two-dimensional code and contains a specifier specifying a mode of the segment (the kind and format of data to be described in the segment) and a data body of the segment.

FIG. 16 illustrates examples of the kinds of the mode to be used in the two-dimensional code. As illustrated in FIG. 16, the modes include ones having data of a fixed length and ones having data of a variable length, and data indicating the data length is also contained in the segment in the mode of the variable length as illustrated in FIG. 17. The segment without data is composed only of a specifier.

The terminator pattern 520 is a bit string indicating the end of the valid information, and the data after the terminator pattern 520 is not output as the reading result of the two-dimensional code.

The padding data 530 is a pattern defined in the standard for the two-dimensional code as invalid data for filling an extra space. In the example in FIG. 15, the padding data 530 is a pattern provided with a repeated part of “11101100” and “00010001” after a 0-addition part. The bit string for being converted into the two-dimensional code needs to have a specific length determined in the standard, and therefore when the output data 510 is shorter, the extra space needs to be filled.

The error correcting data 540 is data used for error correction in reading the two-dimensional code, such as a Reed-Solomon code.

In the bit string 500, the valid information can be arranged in the whole region other than the error correcting data 540, but the amount of the output data 510 is smaller than the size of the region in the example of FIG. 15, and therefore the terminator pattern 520 is arranged and then the residual is filled with the padding data 530.

Further, PTL1 discloses a two-dimensional code recording key data used for decrypting encrypted data coded in a code specification of the two-dimensional code, in an overlapping manner in a configuration in which the key data is written over at least one of the encrypted data and error correcting data.

CITATION LIST Patent Literature SUMMARY OF INVENTION

Technical Problem

According to the method disclosed in PTL1, data other than data to be output when a certain two-dimensional code is read can be described in the same two-dimensional code in a form hard to visually recognize (refer to paragraph 0039 of PTL1).

However, in the method of PTL1, other data is recorded in an overlapping manner over a part of the encrypted data and the error correcting data, and therefore there is a problem of a large constraint on the amount of data recordable in an overlapping manner in consideration of retaining sufficient error correction capability.

An object of the invention is to solve the above problem and to enable to describe, in a two-dimensional code, a larger amount of data other than data to be output in reading the two-dimensional code while retaining sufficient error correction capability in the two-dimensional code. Another object is to enable to output or read such a two-dimensional code.

Solution to Problem

To solve the above problem, a two-dimensional code of the invention includes a first code symbol coding a first valid information according to a first standard; a terminator pattern indicating an end of the first valid information according to the first standard; and a second code symbol arranged after the terminator pattern in a region in which valid information can be arranged according to the first standard and coding a second valid information according to a second standard different from the first standard.

Further, a two-dimensional code output system of the invention includes at least one processor or circuitry or a combination thereof configured to: accept input of first information and second information via an input device; encode the first information according to a first standard, into a first bit string; encode the second information according to a second standard different from the first standard, into a second bit string; generate a combined bit string including the first bit string, terminator data indicating an end of the valid information according to the first standard, and the second bit string in this order; convert the combined bit string into a two-dimensional code according to the first standard, thereby generating the two-dimensional code comprising: a first code symbol coding the first information as valid information according to the first standard; the terminator pattern coding the terminator data; and a second code symbol arranged after the terminator pattern in a region in which the valid information can be arranged according to the first standard and coding the second information according to the second standard; and output the two-dimensional code.

In the above two-dimensional code or the two-dimensional code output system, it is conceivable that the first standard defines a pattern of invalid information to be arranged after the terminator pattern, and the second standard defines a coding rule of information so that information arranged in a predetermined range after the terminator pattern does not coincide with the pattern of the invalid information.

Alternatively, it is also conceivable that the first standard defines a pattern of invalid information to be arranged after the terminator pattern, and a code symbol arranged in a predetermined range after the terminator pattern does not coincide with the pattern of the invalid information in the two-dimensional code.

Further, it is also conceivable that the predetermined range is a predetermined number of bits directly after the terminator pattern.

Further, it is also conceivable that the two-dimensional code includes a third code symbol coding error correcting data according to the first standard, for correcting errors in the first code symbol and the second code symbol, in the above two-dimensional code or the two-dimensional code output system

Further, a two-dimensional code reading system of the invention includes at least one processor or circuitry or a combination thereof configured to: read a two-dimensional code by a reader, decode the two-dimensional code according to a first standard having a definition of a terminator pattern indicating an end of valid information, and thereby obtaining a decoding result; acquire valid information according to the first standard from the decoding result, as first information; and analyze information after the terminator pattern of the decoding result according to a second standard different from the first standard, and thereby acquiring valid information according to the second standard as second information from the decoding result.

In such a two-dimensional code reading system, it is conceivable that the first standard defines a pattern of invalid information to be arranged after the terminator pattern, and the at least one processor or circuitry or the combination thereof is further configured to determine whether or not a code symbol arranged in a predetermined range after the terminator pattern coincides with the pattern of the invalid information and, when the code symbol does not coincide, acquire the valid information according to the second standard as the second information.

Further, it is also conceivable that the predetermined range is a predetermined number of bits directly after the terminator pattern.

Furthermore, it is also conceivable that only the first information among the first information and the second information is outputted to an external part.

Further, it is also conceivable that the at least one processor or circuitry or the combination is further configured to perform error correction on a target region including at least a first sub-region in which the first information is described and a second sub-region in which the second information is described, of the decoding result, using error correcting data contained in the decoding result, the first information is acquired from the decoding result after the error correction, and the second information is acquired from the decoding result after the error correction.

Further, the invention can be embodied as an arbitrary mode such as a device, a method, a computer program, a non-transitory machine-readable storage medium, or the like, other than the above two-dimensional code or systems.

Advantageous Effects of Invention

According to the above configuration of the present invention, it is possible to describe, in a two-dimensional code, a larger amount of data other than data to be output in reading the two-dimensional code while retaining the error correction capability of the two-dimensional code. It is also possible to output or read such a two-dimensional code.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram illustrating an example of a configuration of information contained in a two-dimensional code being one embodiment of the invention.

FIG. 2 is a diagram illustrating examples of standards of formats of non-output data in the information illustrated in FIG. 1.

FIG. 3 is a diagram illustrating an example of a configuration of information contained in a two-dimensional code according only to a first standard.

FIG. 4 is a diagram for explaining a use mode of a two-dimensional code output apparatus and a two-dimensional code reading apparatus handling the two-dimensional code being one embodiment of the invention.

FIG. 5 is a diagram illustrating a hardware configuration of the two-dimensional code output apparatus being one embodiment of the invention.

FIG. 6 is a diagram illustrating a functional configuration of the two-dimensional output apparatus illustrated in FIG. 5.

FIG. 7 is a diagram illustrating a hardware configuration of the two-dimensional code reading apparatus being one embodiment of the invention.

FIG. 8 is a diagram illustrating a functional configuration of the two-dimensional code reading apparatus illustrated in FIG. 7.

FIG. 9 is a flowchart of a two-dimensional code generation process executed by a CPU of the two-dimensional code output apparatus illustrated in FIG. 5.

FIG. 10 is a flowchart of an output data encoding process illustrated in FIG. 9.

FIG. 11 is a flowchart of a non-output data encoding process illustrated in FIG. 9.

FIG. 12 is a flowchart of a padding data addition process illustrated in FIG. 9.

FIG. 13 is a flowchart of a two-dimensional code reading process executed by a CPU of the two-dimensional code reading apparatus illustrated in FIG. 7.

FIG. 14 is a diagram illustrating an example of a conventional two-dimensional code.

FIG. 15 is a diagram illustrating an example of a configuration of information contained in the conventional two-dimensional code.

FIG. 16 is a diagram illustrating an example of a standard of a format of output data in the information illustrated in FIG. 15.

FIG. 17 is a diagram illustrating a configuration of a segment having a variable data length among segments in FIG. 15.

DESCRIPTION OF EMBODIMENTS

Embodiments of the invention will be explained referring to the drawings.

First, a two-dimensional code being one embodiment of the invention represents a binary bit string by an array of white modules and black modules different from each other in light reflectance, and the bit string represents information, for example, in the same form as illustrated in FIG. 15. More specifically, the two-dimensional code is hard to be discriminated from the conventionally-known two-dimensional code at a glance though the array of the modules is different according to the content of the represented bit string.

FIG. 1 illustrates an example of a configuration of information contained in a two-dimensional code being one embodiment of the invention.

A bit string (encoded data) 300 represented by the two-dimensional code of this embodiment includes output data 310, a first terminator pattern 320, non-output data 330, a second terminator pattern 340, padding data 350, and error correcting data 360.

The output data 310, the first terminator pattern 320, and the error correcting data 360 are data according to a first standard, and the standard explained using FIG. 14 to FIG. 17 is used here as the first standard. More specifically, the output data 310 is data including a plurality of segments and obtained by converting valid information to be output as a reading result of the two-dimensional code into a bit string according to the first standard. The first terminator pattern 320 is a bit string defined in the first standard and indicating the end of the valid information. The error correcting data 360 is data used for error correction in reading the two-dimensional code, such as a Reed-Solomon code. All of bits before the error correcting data 360 are the target of the error correction.

On the other hand, in the bit string 300, different from the bit string 500 in FIG. 15, the non-output data 330 and the second terminator pattern 340 are arranged in a region after the first terminator pattern 320. The valid information can be arranged in the region according to the first standard, but the region is filled with padding data 350 if the valid information is not arranged thereto.

The non-output data 330 is data obtained by converting arbitrary data which is not output as the reading result of the two-dimensional code into a bit string according to a second standard different from the first standard. The usage of the non-output data 330 is also arbitrary. In this example, the non-output data 330 also includes a plurality of segments as with the output data 310. Each of the segments is defined in the second standard and contains a specifier specifying a mode of the segment (the kind and format of data to be described in the segment) and a data body of the segment.

FIG. 2 illustrates examples of the kind of the mode to be used in the second standard. The modes include ones having data of a fixed length and ones having data of a variable length, and data indicating the data length is also contained in the segment in the mode of the variable length. These points are the same as in the case of the first standard. Note that in the second standard, to discriminate the non-output data 330 from the padding data according to the first standard, a terminator pattern B is defined in addition to a terminator pattern A indicating the end of the non-output data 330. The terminator pattern B will be explained later in detail.

The second terminator pattern 340 is a bit string (the terminator pattern A) defined in the second standard and indicating the end of the non-output data 330. The terminator pattern A is “0000” that is the same as the terminator pattern in the first standard here, but may be a different pattern.

The padding data 350 is a pattern defined in the second standard as invalid data for filling an extra space. Though a pattern of the same rule as that defined in the first standard in which a repeated part of “11101100” and “00010001” is provided after a 0-addition part where “0” is added until the number of bits of the data becomes a multiple of 8 is used in the example in FIG. 1, a pattern of a rule different from that of the first standard may be used.

The bit string 300 having the above configuration does not comply with the first standard in that the non-output data 330, the second terminator pattern 340, and the padding data 350 exist in the region in which the padding data according to the first standard should exist. However, since merely the content of the bit string is different, a two-dimensional code can be generated by generating code symbols composed of arbitrary modules based on the values of respective bits according to the first standard. The two-dimensional code made by converting the bit string 300 into a two-dimensional code according to the first standard as explained above is the two-dimensional code being the one embodiment of the invention. Note that it is defined in the second standard to employ the same rule as that of the first standard, as the standard for generating code symbols based on the non-output data 330, the second terminator pattern 340, and the padding data 350. Accordingly, the above-described generation of the two-dimensional code according to the first standard can be said to accord also to the second standard regarding the portion of the non-output data 330, the second terminator pattern 340, and the padding data 350.

The two-dimensional code generated in the above contains a first code symbol coding valid information according to the first standard (a code symbol corresponding to the output data 310), a terminator pattern indicating the end of the valid information according to the first standard (a code symbol corresponding to the first terminator pattern 320), a second code symbol arranged after the terminator pattern and cording valid information according to the second standard (a code symbol corresponding to the non-output data 330), and a third code symbol coding error correcting data for correcting errors of the first code symbol and the second code symbol (a code symbol corresponding to the error correcting data 360).

When the above two-dimensional code is read by a reading apparatus supporting the first standard only, only the portion of the output data 310 is taken out as valid data and output. In this case, the portion after the first terminator pattern 320 does not strictly comply with the first standard, but is not a region in which valid data is stored, and is simply ignored, causing no particular influence on a reading process.

On the other hand, when a reading apparatus also supporting the second standard like a later-described reading apparatus 200 reads the two-dimensional code, the non-output data 330 is taken out, in addition to the output data 310, as valid data, and can be used for various processes. The usage of the non-output data 330 is arbitrary, and there are variously conceivable examples such as an authentication process for confirming the preparer of the output data 310 and the absence of tampering, processing of the output data 310 (such as decryption of the encrypted output data 310), notification to the user of the reading apparatus by light, sound, display of message, and the like.

Further, as explained above, the two-dimensional code containing the non-output data 330 is hard to be discriminated, by the naked eye, from the two-dimensional code not containing the non-output data 330 and according only to the first standard. Accordingly, by employing the standard widely used in the world such as the standard in conformity to JIS (Japanese Industrial Standards) as the first standard, information that cannot be read by an ordinary reading apparatus but can be acquired only by a person having a special reading apparatus supporting also the second standard can be embedded in the two-dimensional code in a form invisible to people. Accordingly, it can be expected to transmit, only to a specific person, information that is different from information to other people, through the reading of the two-dimensional code while placing the two-dimensional code itself in an environment exposed to the public.

Further, according to the method explained here, more non-output data 330 can be described in the two-dimensional code as compared with the method disclosed in PTL1.

For example, considering an example of the version 1 of the QR code (trademark), in the standard with the highest correcting capability, it is defined that 72 bits of valid output data and 136 bits of error correcting data should be described in one two-dimensional code. Besides, in the standard with the lowest correcting capability, it is defined that 152 bits of valid output data and 56 bits of error correcting data should be described.

In the method disclosed in PTL1, when one bit of data is written over the output data 510 or error correcting data 540 and recorded, the correcting capability corresponding to two bits of error correcting data is lost. Accordingly, the largest data which can be written over while retaining the lowest correcting capability according to the standard of the version 1 is, data corresponding to (136−56)/2=40 bits, by using the standard with the highest correcting capability and sacrificing correcting capability therein up to the difference from the correcting capability of the standard with the lowest correcting capability. In this event, 72 bits of the output data 510 can be described.

On the other hand, in the case of the method of this embodiment, the non-output data 330 will be described at the expense of the region in which the output data is to be described. If it is only necessary to retain the minimum error correction capability, 152 bits of output data can be described. Then, if it is only necessary to describe 72 bits as in the method disclosed in PTL1, the difference 152−72=80 bits can be used for description of the non-output data 330. However, the first terminator pattern 320 is unnecessary when the output data 310 is described in the whole region prepared for the output data, whereas when the non-output data 330 is described, four bits of first terminator pattern 320 after the output data 310 are required, so that the maximum amount of the non-output data 330 that can be actually described is 80−4=76 bits.

Though the explanation has been made using the numerical values of the version 1 here, similar results are obtained even when using numerical values of other versions. This also applies to the case of other two-dimensional codes having an error correcting function.

Accordingly, in the method of this embodiment, it can be said that the non-output data 330 of a larger size than that in the method disclosed in PTL1 can be described in the two-dimensional code while retaining sufficient error correction capability (in a sense of according to the widely used standard).

Further, in the method disclosed in PTL1, data to be recorded, written over the output data 510 or the error correcting data 540, is not the target of error correction with the error correcting data 540. Thus, if a reading error occurs due to a friction or the like of the code symbol, correction is impossible. On the other hand, in the method of this embodiment, not only the output data 310 but also the non-output data 330 are the target of error correction with the error correcting data 360, so that even if a reading error occurs, correction up to a certain error amount is possible. Accordingly, also in the portion of the non-output data 330 not according to the first standard, reliability can be retained.

Incidentally, the bit string 300 illustrated in FIG. 1 is configured such that the reading apparatus reading the two-dimensional code and decoding it according to the first standard to acquire a bit string corresponding to the code symbols in the two-dimensional code can easily determine whether or not the non-output data 330 is contained therein. Next, this point will be explained.

FIG. 3 illustrates an example of a configuration of information contained in a two-dimensional code according only to the first standard and not containing the non-output data 330.

A bit string 500 illustrated in FIG. 3 is the same as that illustrated in FIG. 15, and is additionally illustrated here to pay attention on a region 531 of top four bits of the padding data 530 directly after the terminator pattern 520.

Though the rule of the padding data 530 is as has been described, the top four bits are limited to five patterns depending on the number of bits of “0” added in the 0-addition part, such as “1110” for 0 bit, “0111” for one bit, “0011” for two bits, “0001” for three bits, and “0000” for four or more bits.

Hence, by making the top four bits (a region 331) not coincide with any of the above five patterns when arranging the non-output data 330 in the bit string 300 in FIG. 1, it is possible to determine, in reading the two-dimensional code, that the non-output data 330 is arranged on the basis that the four bits directly after the first terminator pattern 320 do not coincide with any of the above five patterns. To enable the determination, the above five patterns are defined as the terminator patterns B in the rule illustrated in FIG. 2, and are not used for specifying the mode in the second standard. Accordingly, it is possible to determine the presence or absence of the non-output data 330, based on whether or not the four bits directly after the first terminator pattern 320 are any one of the terminator patterns B.

Note that the data used for the determination does not always have to be located at the top of the non-output data 330 and does not have to be directly after the first terminator pattern 320. The size of the data does not have to be four bits. Anyway, the same determination is possible by determining the second standard such that the information arranged in a predetermined range after the first terminator pattern 320 does not coincide with the padding data 350 when the non-output data 330 exists, and setting which range of data is used for the determination, in the reading apparatus. Though there occurs a waste in space, it is not essential that the non-output data 330 starts directly after the first terminator pattern 320.

Next, embodiments of a two-dimensional code output system, a two-dimensional code reading system, and methods corresponding thereto of the invention to handle the above-explained two-dimensional code will be explained.

FIG. 4 is a diagram illustrating a use mode of a two-dimensional code output apparatus being one embodiment of the two-dimensional code output system and a two-dimensional code reading apparatus being one embodiment of the two-dimensional code reading system. Note that in the example of FIG. 4, each of the two-dimensional code output apparatus and the two-dimensional code reading apparatus is constituted as a system composed of one apparatus including all necessary functions, but it is of course conceivable to constitute the same system by cooperating a plurality of apparatuses provided with the necessary functions distributed.

A two-dimensional code output apparatus 100 illustrated in FIG. 4 has a function of accepting input of information to be described in the two-dimensional code as the output data 310 and the non-output data 330 illustrated in FIG. 1 and generating and outputting a two-dimensional code 10 coding the information as illustrated in FIG. 1 based on the accepted information. The output can be performed in an arbitrary mode such as display by a display, projection on a screen, printing on a target object by a printer, alteration of the target object by exposure to light, and transmission of image data via a communication path such as a network or the like.

On the other hand, the two-dimensional code reading apparatus 200 has a function of reading the two-dimensional code 10 output from the two-dimensional code output apparatus 100. Though the two-dimensional code presented on the reading target object by any method such as display, projection, printing or the like is optically read here, it is not prohibited to perform reading by a method other than the optical one, such as reading the code symbol supplied as an image data by analysis of the image data, or the like.

The two-dimensional code reading apparatus 200 has a function of decoding the read two-dimensional code 10 to acquire the output data 310 and the non-output data 330. Further, the two-dimensional code reading apparatus 200 has a function of outputting the output data 310 among them to a predetermined output destination, and not outputting the non-output data 330 to an external part but using it for an internal process. The detail of the internal process to be executed differs depending on the usage of the non-output data 330. The output of the output data 310 can also be performed by an arbitrary method such as transmission via a communication path such as a network, display by a display, projection on a screen, printing on a target object by a printer, alteration of the target object by exposure to light, output of sound through a speaker, or the like.

The non-output data 330 is not data according to the first standard, and therefore in order to make the output of the two-dimensional code reading apparatus 200 into the one complying with the first standard, the output is preferably only the output data 310 being data according to the first standard. However, if it is not necessary to make the non-output data 330 into the one complying with the first standard, it is also conceivable to output the non-output data 330 to the external part together with the output data 310 or separately from the output data 310. In this case, the output destination and the output method may be different between the non-output data 330 and the output data 310.

Next, the configuration of the two-dimensional code output apparatus 100 will be explained in more detail. FIG. 5 is a diagram illustrating its hardware configuration, and FIG. 6 is a diagram illustrating its functional configuration.

As illustrated in FIG. 5, the two-dimensional code output apparatus 100 has a configuration including a CPU 101, a ROM 102, a RAM 103, a storage 104, a communication I/F (interface) 105, an operation part 106, and a display part 107, which are connected by a system bus 108.

The CPU 101 executes a required program stored in the ROM 102 or the storage 104 using the RAM 103 as a work area and thereby controls the whole two-dimensional code output apparatus 100 so as to realize various functions including those illustrated in FIG. 6.

The communication I/F 105 is an interface for communicating with other apparatuses such as an information input apparatus, an information output apparatus and the like over an arbitrary communication channel such as a network or the like. It is only necessary to provide a communication I/F according to the standard for the communication path to be used.

The operation part 106 is an operation device for accepting operations from a user, and can be composed of various keys, switches, touch panels and the like.

The display part 107 is a presenting device for presenting the operation state and setting status of the two-dimensional code output apparatus 100, and message and the like to the user, and includes a liquid crystal display, a lamp, and so on.

Note that the operation part 106 and the display part 107 may be external ones. Besides, in the case where the two-dimensional code output apparatus 100 does not have to directly accept operations from the user (accepting operations and presenting information through an external apparatus connected via the communication I/F 105 is enough), the operation part 106 and the display part 107 can be omitted.

For the two-dimensional code output apparatus 100, a general-purpose computer can also be used as hardware.

Further, as illustrated in FIG. 6, the two-dimensional code output apparatus 100 has, as functions related to the generation of the two-dimensional code, functions of an output data accepting part 111, a non-output data accepting part 112, a first encoding part 113, a second encoding part 114, an error correcting data addition part 115, a two-dimensional code generation part 116, and a two-dimensional code output part 117.

The output data accepting part 111 has a function of accepting input of information (first information) to be described, as the output data 310, in the two-dimensional code 10. The non-output data accepting part 112 has a function of accepting input of information (second information) to be described, as the non-output data 330, in the two-dimensional code 10. These pieces of information may be inputted by the user or may be received from another apparatus through communication. Besides, information selected by the user or information automatically selected based on some conditions among the information stored in advance in the two-dimensional code output apparatus 100 or another apparatus may be read. Besides, the information may be automatically generated based on some parameters selected by the user or automatically decided. In addition, the input can be accepted by an arbitrary method, and the input accepting method may be changed depending on some conditions. The input of information may be accepted by methods different between the output data accepting part 111 and the non-output data accepting part 112.

The first encoding part 113 has a function of encoding the information accepted by the output data accepting part 111 according to the first standard to thereby convert it into a bit string of the output data 310 illustrated in FIG. 1, and adding the first terminator pattern 320 thereto if there is a margin up to the maximum amount of data.

The second encoding part 114 has a function of encoding the information accepted by the non-output data accepting part 112, according to the second standard to thereby convert it into a bit string of the non-output data 330 illustrated in FIG. 1, coupling it to the bit string generated by the first encoding part 113, and adding the second terminator pattern 340 and the padding data 350 thereto if there is a margin up to the maximum amount of data.

The error correcting data addition part 115 has a function of generating the error correcting data 360 for correcting an error in reading on the basis of the bit string generated by the second encoding part 114, and adding it to the bit string. Thus, the bit string 300 illustrated in FIG. 1 is generated.

The two-dimensional code generation part 116 has a function of converting the bit string 300 into a code symbol according to the first standard to thereby generate the two-dimensional code 10.

The two-dimensional code output part 117 has a function of outputting the two-dimensional code 10 generated by the two-dimensional code generation part 116, by a suitable method.

The two-dimensional code output apparatus 100 can generate and output the two-dimensional code 10 in which the data having the configuration explained using FIG. 1 is described by the functions of the above parts. Note that in the case where the description of the non-output data 330 is unnecessary, namely, the non-output data accepting part 112 does not accept the input of information, the second encoding part 114 needs only to add the padding data 530 illustrated in FIG. 3. This enables the two-dimensional code output apparatus 100 to generate and output the two-dimensional code 10 not containing the non-output data 330, in which the data having the configuration explained using FIG. 3 is described.

Next, the configuration of the two-dimensional code reading apparatus 200 will be explained in more detail. FIG. 7 is a diagram illustrating its hardware configuration, and FIG. 8 is a diagram illustrating its functional configuration.

As illustrated in FIG. 7, the two-dimensional code reading apparatus 200 is an apparatus including an optical part 210, a decoder 220, an operation part 231, and a notification part 232, for reading the two-dimensional code 10 represented by a symbol different in light reflectance from the surroundings on a reading target object 20 by directing the optical part 210 toward the reading target object 20.

The optical part 210 is a reader including an imaging sensor 211, a lens 212, and a pulse LED (light-emitting diode) 213, for optically reading the two-dimensional code 10.

The imaging sensor 211 is an imager for capturing an image of the reading target object 20. The imaging sensor 21 can be composed of, for example, a CMOS (complementary metal oxide semiconductor) image sensor. Besides, the imaging sensor 211 can generate image data indicating a gradation value of each pixel on the basis of electric charges accumulated in each pixel of the image sensor by capturing the image, and output the image data to the decoder 220. In this imaging sensor 211, pixels are two-dimensionally arranged.

The lens 212 is an optical system for forming an image of reflected light from the reading target object 20 including the two-dimensional code 10, on the imaging sensor 211.

The pulse LED 213 is an illuminator for irradiating the reading target object 20 being an image-capturing target with illumination light.

Next, the decoder 220 includes a CPU 221, a ROM 222 which stores programs executed by the CPU 221 and data such as various tables, a RAM 223 which is used as a working area when the CPU 221 executes various processes, and a communication I/F 224 for communicating with external apparatuses.

As the above CPU 221, ROM 222, and RAM 223, for example, an ASIC (Application Specific Integrated Circuit), a Flash ROM (FROM), an SDRAM (Synchronous Dynamic Random Access Memory), and so on can be used.

The CPU 221 controls operations of the whole two-dimensional code reading apparatus 200 including the optical part 210, the operation part 231, and the notification part 232 by executing programs stored in the ROM 222 while using the RAM 223 as working area. The CPU 221 further performs processes such as detection and decoding of the two-dimensional code 10 included in the image data of the image captured by the imaging sensor 211, output of the decoding result to an external part or accumulation, adjustment of the illumination light amount (or time) by the pulse LED 213, and so on.

The communication I/F 224 is an interface for communicating with data processing apparatuses such as a PC (personal computer) which processes the decoding result by the decoder 220, and an arbitrary standard regardless of wired or wireless is applicable thereto. Besides, control parameters may be set in the decoder 220 based on data read from the communication I/F 224.

The operation part 231 is an operation device such as a button and a trigger for accepting operations of the user.

The notification part 232 is a notifier for performing various notifications to the user. Conceivable concrete notification methods include, but not limited to, display of message and data by a display, lighting or blinking of a lamp, output of sounds by a speaker and so on.

Besides, as illustrated in FIG. 8, the two-dimensional code reading apparatus 200 has, as functions relating to reading of the two-dimensional code, functions of a code symbol reading part 241, a first decoding part 242, an error correction part 243, a valid data acquisition part 244, a non-output data acquisition part 245, an output data processing part 246, an information output part 247, and another processing part 248.

The code symbol reading part 241 has a function of reading the two-dimensional code 10 by the optical part 210 to acquire the image of the two-dimensional code 10.

The first decoding part 242 has a function of a decoder which decodes the image of the code symbol acquired by the code symbol reading part 241, according to the first standard, and converts the image into a bit string. The error correction part 243 has a function of an error corrector which performs, on the bit string acquired from the first decoding part 242, an error correction process using the error correcting data contained therein. The target of the error correction is the whole bit string before the error correcting data, and the target of the error correction is not only the output data (310 in FIG. 1 or 510 in FIG. 5) but also the non-output data (330 in FIG. 1) if contained. The two-dimensional code reading apparatus 200 determines that the reading this time fails when the decoding or the error correction has failed, and performs next reading.

The valid data acquisition part 244 has a function of a first acquirer which acquires the output data (310 in FIG. 1 or 510 in FIG. 5) from the bit string after the error correction by the error correction part 243, and decodes it according to the first standard to return a bit string in each segment to the information before the encoding to thereby acquire first information being the valid data according to the first standard. The valid data acquisition part 244 further has a function of passing a bit string after the terminator pattern (320 in FIG. 1 or 520 in FIG. 3) according to the first standard, if existing, to the non-output data acquisition part 245.

The non-output data acquisition part 245 has a function of a second acquirer which acquires the non-output data (330 in FIG. 1), if existing, from the bit string passed from the valid data acquisition part 244, and decodes it according to the second standard to return a bit string in each segment to the information before the encoding to thereby acquire second information being the valid data according to the second standard.

The non-output data acquisition part 245 further has a function of passing, when having acquired the second information, the second information to the functional part performing a necessary process on the basis of the setting made in the two-dimensional code reading apparatus 200 or the specification of the kind of process included in the second information in order to execute the processes based on the second information. In the example of FIG. 8, in the case where the necessary process is a process on the first information, the non-output data acquisition part 245 passes the second information to the output data processing part 246, and otherwise the non-output data acquisition part 245 passes the second information to the other processing part 248 that handles the process. Note that when the non-output data 330 is not contained in the bit string, the non-output data acquisition part 245 passes information indicating that there is no second information, to the output data processing part 246.

The output data processing part 246 has a function of performing a process on the first information passed from the valid data acquisition part 244 based on the second information passed from the non-output data acquisition part 245. An algorithm of the process may be a predetermined fixed one, one selected or automatically generated based on a value of a specific item of the second information, or another one. There is also an option of performing no process. In the case where there is no second information, the output data processing part 246 merely passes the first information therethrough to the information output part 247.

The information output part 247 has a function of outputting the first information processed by the output data processing part 246 by a suitable method.

The two-dimensional code reading apparatus 200 can read the two-dimensional code 10 in which the data having the configuration explained in FIG. 1 is described by the functions of the above parts, execute processes according to the non-output data 330 contained therein, and output the first information obtained by decoding the output data 310. Besides, also when having read the two-dimensional code 10 in which the data having the configuration explained using FIG. 3, the two-dimensional code reading apparatus 200 can output the first information obtained by decoding the output data 510 contained therein.

Next, the processes corresponding to the functions illustrated in FIG. 6 and FIG. 8 executed by the two-dimensional code output apparatus 100 or the two-dimensional code reading apparatus 200 will be explained. These processes are processes relating to the embodiment of the two-dimensional code output method or the two-dimensional code reading method of the invention. Further, the processes illustrated in the following flowcharts are performed by the CPU 101 of the two-dimensional code output apparatus 100 or the CPU 221 of the two-dimensional code reading apparatus 200 executing required programs, but explained as those executed by the two-dimensional code output apparatus 100 or the two-dimensional code reading apparatus 200 for easy explanation.

First, FIG. 9 illustrates a flowchart of a process of generating a two-dimensional code containing the non-output data, executed by the two-dimensional code output apparatus 100.

When instructed to generate the two-dimensional code containing the non-output data by a predetermined user operation, command or the like, the two-dimensional code output apparatus 100 starts the process illustrated in FIG. 9.

In this process, the two-dimensional code output apparatus 100 first accepts input of information to be described as the output data 310 in FIG. 1 and information to be described as the non-output data 330 in FIG. 1 (S11, S12). This process corresponds to the functions of the output data accepting part 111 and the non-output data accepting part 112.

Next, the two-dimensional code output apparatus 100 encodes the information accepted in step S11 by the encoding process on the output data in FIG. 10 to generate the bit string of the output data 310 and the first terminator pattern 320 (S13). This process corresponds to the function of the first encoding part 113.

More specifically, the two-dimensional code output apparatus 100 executes the process of taking out the information corresponding to one segment from the information accepted in step S11 and generating a bit string of the segment according to the first standard (S21), and coupling it to the bit string generated up to here (S22), and repeatedly executes the process for all of the segments (S23). The boundary of the segment is determined depending on the item of information and the kind of character, and a definition by the first standard may be adopted.

If the first standard is decided by the provider or the user of the two-dimensional code output apparatus 100, it is conceivable that when the information accepted in step S11 is composed of a plurality of items of information, at least the boundary of the item is regarded as the boundary of the segment. Besides, it is conceivable that a change of the kind of character such as a change from numeric characters to Chinese characters is regarded as the boundary of the segment.

When the bit string generated up to step S23 is shorter by four or more bits than the maximum size of the output data 310, namely, when there is a margin to add the first terminator pattern 320 (S24), the two-dimensional code output apparatus 100 adds the first terminator pattern 320 by coupling (S25), and returns to the process in FIG. 9. When there is no margin in step S24, the two-dimensional code output apparatus 100 returns to the process in FIG. 9 without coupling the first terminator pattern 320.

Next, the two-dimensional code output apparatus 100 encodes the information accepted in step S12 by the encoding process on the non-output data in FIG. 11 to generate the bit string of the non-output data 330 and the second terminator pattern 340, and couples it to the bit string generated in step S13 (S14). This process corresponds to the function of the second encoding part 114.

More specifically, the two-dimensional code output apparatus 100 executes the process of taking out data corresponding to one segment from the information accepted in step S12 and generating a bit string of the segment according to the second standard (S31), and coupling it to the bit string generated up to here (S32), and repeatedly executes the process for all of the segments (S33). The boundary of the segment is decided depending on the item of information and the kind of character, and a reference defined by the second standard may be adopted. If the second standard is determined by the provider or the user of the two-dimensional code output apparatus 100, it is conceivable to define the boundary based on the same approach as those explained in the explanation of FIG. 10 regarding the first standard.

When the bit string generated up to step S33 is shorter by four or more bits than the maximum size describable in the two-dimensional code except the error correcting data 360, namely, when there is a margin to add the second terminator pattern 340 (S34), the two-dimensional code output apparatus 100 adds the second terminator pattern 340 by coupling (S35) and returns to the process in FIG. 9. When there is no margin in step S34, the two-dimensional code output apparatus 100 returns to the process in FIG. 9 without coupling the second terminator pattern 340.

Note that when the generated bit string becomes longer than the maximum size describable in the two-dimensional code except the error correcting data 360 at any point in the process up to here, the two-dimensional code output apparatus 100 regards it as failure of the generation of the two-dimensional code, and performs an error process.

Next, the two-dimensional code output apparatus 100 generates a bit string of the padding data 350 by a padding data addition process in FIG. 12 and couples it to the bit string generated up to step S14 (S15). This process also corresponds to the function of the second encoding part 114.

More specifically, unless the number of bits of the bit string generated up to here is a multiple of 8 (S41), the two-dimensional code output apparatus 100 adds a bit of “0” to the generated bit string until the number of bits becomes a multiple of 8 (S42). Thereafter, the two-dimensional code output apparatus 100 adds a predetermined repeated pattern to the bit string until the bit string becomes the maximum size describable in the two-dimensional code (S43), and returns to the process in FIG. 9.

Next, the two-dimensional code output apparatus 100 generates the error correcting data 360 based on the bit string generated in the process up to here and adds it to the bit string (S16). This process corresponds to the function of the error correcting data addition part 115.

The bit string 300 is completed here, and the two-dimensional code output apparatus 100 generates the two-dimensional code 10 coding the bit string generated up to here according to the first standard (S17), outputs it to a suitable output destination (S18), and ends the process in FIG. 9. These processes correspond to the functions of the two-dimensional code generation part 116 and the two-dimensional code output part 117.

The two-dimensional code output apparatus 100 can generate and output the two-dimensional code 10 in which the data having the configuration explained using FIG. 1 is described by the above processes. Note that in the case of generating the two-dimensional code not containing the non-output data, the two-dimensional code output apparatus 100 merely skips steps S12 and S14.

Next, FIG. 13 illustrates a flowchart of the reading process of the two-dimensional code executed by the two-dimensional code reading apparatus 200.

When instructed to read the two-dimensional code by a predetermined user operation, command or the like, the two-dimensional code reading apparatus 200 starts a process illustrated in FIG. 13. At this point in time, it is not necessary to consider whether or not the non-output data 330 is contained in the two-dimensional code being a reading target.

In the process of FIG. 13, the two-dimensional code reading apparatus 200 first acquires the image of the two-dimensional code 10 being the reading target, and performs decoding and error correction according to the first standard to obtain the bit string 300 (or the bit string 500) (S51). This process will fail if the two-dimensional code 10 is not accommodated in a frame or the brightness and focus at image capturing are not appropriate, and is therefore repeated until the process succeeds while the conditions are appropriately changed (S52). This process is a process of a decoding step and an error correction step, and corresponds to the functions of the code symbol reading part 241, the first decoding part 242 and the error correction part 243.

Next, the two-dimensional code reading apparatus 200 acquires the portion of the output data 310 (or S10) from the bit string of the decoding result in step S51, and converts it into the information before the encoding according to the first standard (S53). This process is a process of a first acquisition step and corresponds to the function of the valid data acquisition part 244.

Next, the two-dimensional code reading apparatus 200 determines whether or not the four bits directly after the first terminator pattern 320 (or 520) of the decoding result are any one of the terminator patterns B in the second standard (S54). If this result is No (not any one of them), the two-dimensional code reading apparatus 200 determines that the non-output data 330 is contained in the decoding result, and proceeds to step S55 and subsequent steps.

The two-dimensional code reading apparatus 200 analyzes the bit string after the first terminator pattern 320 of the decoding result according to the second standard, and converts the portion of the non-output data 330 into the information before the encoding (S55). The process in steps S54 and S55 is a process of a second acquisition step and corresponds to the function of the non-output data acquisition part 245.

Next, the two-dimensional code reading apparatus 200 executes the process according to the non-output data acquired in step S55 (S56), then outputs the output data before the encoding to a predetermined output destination (S57), and ends the process in FIG. 13. These processes correspond to the functions of the output data processing part 246 and the information output part 247. The process in step S56 can be arbitrarily determined according to the usage of the non-output data.

Besides, with Yes (any one of them) in step S54, the two-dimensional code reading apparatus 200 determines that the non-output data is not contained in the decoding result, and proceeds to step S57 while skipping step S55 and step S56, and performs output of the output data before the encoding.

Through the above processes, the two-dimensional code reading apparatus 200 reads the two-dimensional code 10 in which the data having the configuration explained using FIG. 1 or FIG. 3 is described, outputs the output data before the encoding, and can execute various processes according to the non-output data when the non-output data is contained.

Hereinabove, the explanation of the embodiments is completed, and the concrete configurations of the code symbol, system and apparatus, the concrete process procedure, the form of data, the concrete data content, the standard to be adopted and so on are not limited to those explained in the embodiments.

For example, the two-dimensional code of the standard of representing data by arraying square white (high reflectance) modules and black (low reflectance) modules is used in the above embodiments, but is not limited to them. A two-dimensional code in which bar modules are two-dimensionally arrayed and a two-dimensional code in which hexagonal modules are arrayed may be used.

Besides, it is not essential that the pattern of the padding data is defined in the standard, and the data after the terminator pattern may be arbitrary.

The embodiment of the program of the invention is a program for causing one computer or a plurality of computers in cooperation to control required hardware so as to realize the functions of the two-dimensional code output apparatus 100 or the two-dimensional code reading apparatus 200 in the above-explained embodiments, or to execute the processes explained in the above-explained embodiments.

Such a program may be stored in a ROM or another non-volatile storage medium (flash memory, EEPROM, or the like) originally included in the computer. The program can be provided while being recorded on an arbitrary non-volatile recording medium such as a memory card, a CD, a DVD, a Blu-ray Disc or the like. The program can also be downloaded from an external apparatus connected to the network, and installed into and executed by the computer.

Further, the configurations of the above-explained embodiments and modified examples can be embodied in an arbitrary combination unless they are inconsistent with one another and, as a matter of course, can be embodied while taking out only parts of them.

REFERENCE SIGNS LIST

10 . . . two-dimensional code, 20 . . . reading target object, 100 . . . two-dimensional code output apparatus, 200 . . . two-dimensional code reading apparatus, 210 . . . optical part, 220 . . . decoder, 300, 500 . . . bit string, 310, 510 . . . output data, 320, 340, 520 . . . terminator pattern, 330 . . . non-output data, 350, 530 . . . padding data, 360, 540 . . . error correcting data 

The invention claimed is:
 1. A two-dimensional code output system comprising at least one processor or circuitry or a combination thereof configured to: accept input of first information and second information via an input device; encode the first information according to a first standard, into a first bit string; encode the second information according to a second standard different from the first standard, into a second bit string; generate a combined bit string including the first bit string, terminator data indicating an end of valid information according to the first standard, and the second bit string in this order; convert the combined bit string into a two-dimensional code according to the first standard, thereby generating the two-dimensional code comprising: a first code symbol coding the first information as the valid information according to the first standard; the terminator pattern coding the terminator data; and a second code symbol arranged after the terminator pattern in a region in which the valid information can be arranged according to the first standard and coding the second information according to the second standard; and output the two-dimensional code.
 2. The two-dimensional code output system according to claim 1, wherein the first standard defines a pattern of invalid information to be arranged after the terminator pattern, and wherein the second standard defines a coding rule of information so that information arranged in a predetermined range after the terminator pattern does not coincide with the pattern of the invalid information.
 3. The two-dimensional code output system according to claim 2, wherein the predetermined range is a predetermined number of bits directly after the terminator pattern.
 4. The two-dimensional code output system according to claim 1, wherein the first standard defines a pattern of invalid information to be arranged after the terminator pattern, and wherein a code symbol arranged in a predetermined range after the terminator pattern does not coincide with the pattern of the invalid information in the output two-dimensional code.
 5. The two-dimensional code output system according to claim 4, wherein the predetermined range is a predetermined number of bits directly after the terminator pattern.
 6. The two-dimensional code output system according to claim 1, wherein the output two-dimensional code further comprises a third code symbol coding error correcting data according to the first standard, for correcting errors in the first code symbol and the second code symbol.
 7. A two-dimensional code output method comprising: accepting input of first information and second information via an input device; encoding the first information according to a first standard, into a first bit string; encoding the second information according to a second standard different from the first standard, into a second bit string; generating a combined bit string including the first bit string, terminator data indicating an end of valid information according to the first standard, and the second bit string in this order; converting the combined bit string into a two-dimensional code according to the first standard, thereby generating the two-dimensional code comprising: a first code symbol coding the first information as the valid information according to the first standard; the terminator pattern coding the terminator data; and a second code symbol arranged after the terminator pattern in a region in which the valid information can be arranged according to the first standard and coding the second information according to the second standard; and outputting the two-dimensional code.
 8. The two-dimensional code output method according to claim 7, wherein the first standard defines a pattern of invalid information to be arranged after the terminator pattern, and wherein the second standard defines a coding rule of information so that information arranged in a predetermined range after the terminator pattern does not coincide with the pattern of the invalid information.
 9. The two-dimensional code output method according to claim 8, wherein the predetermined range is a predetermined number of bits directly after the terminator pattern.
 10. The two-dimensional code output method according to claim 7, wherein the first standard defines a pattern of invalid information to be arranged after the terminator pattern, and wherein a code symbol arranged in a predetermined range after the terminator pattern does not coincide with the pattern of the invalid information in the output two-dimensional code.
 11. The two-dimensional code output method according to claim 10, wherein the predetermined range is a predetermined number of bits directly after the terminator pattern.
 12. The two-dimensional code output method according to claim 7, wherein the output two-dimensional code further comprises a third code symbol coding error correcting data according to the first standard, for correcting errors in the first code symbol and the second code symbol.
 13. A non-transitory machine-readable storage medium containing program instructions executable by a computer, and when executed, causing one computer or a plurality of computers in cooperation to execute: accepting input of first information and second information via an input device; encoding the first information according to a first standard, into a first bit string; encoding the second information according to a second standard different from the first standard, into a second bit string; generating a combined bit string including the first bit string, terminator data indicating an end of valid information according to the first standard, and the second bit string in this order; converting the combined bit string into a two-dimensional code according to the first standard, thereby generating the two-dimensional code comprising: a first code symbol coding the first information as the valid information according to the first standard; the terminator pattern coding the terminator data; and a second code symbol arranged after the terminator pattern in a region in which the valid information can be arranged according to the first standard and coding the second information according to the second standard; and outputting the two-dimensional code. 